home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / debugtx.arc / 04CONTRL.DOC < prev    next >
Encoding:
Text File  |  1991-08-11  |  10.5 KB  |  232 lines

  1. CHAPTER 4    D86 CONTROL KEYS                                 4-1
  2.  
  3. D86 has a set of functions invoked by single keys.  Keys which 
  4. switch the display (for example, to show a help screen) can be 
  5. pressed in any context, to be acted upon immediately.  Other 
  6. keys, such as the single-stepping keys, can be invoked any time 
  7. D86 is awaiting the beginning of an assembly-language command.  
  8.  
  9.  
  10. Display Control Keys
  11.  
  12. There are numerous keys that let you control the switchable 
  13. window in the upper right corner of the screen.  The F10 and Alt-
  14. F10 keys let you toggle between windows, giving you a "tour" of 
  15. what's available.  Various keys accessed by using the "Ctrl" key 
  16. as a shift key let you move directly to the window of your 
  17. choice. 
  18.  
  19. The keys in this section are acted upon in any debugger context, 
  20. whether you are in the main command mode or in the middle of one 
  21. of the other modes (typing in a debugger command, an immediate-
  22. execute line, a patch-memory line, or a memory window 
  23. specification): 
  24.  
  25. ALT-F10   Toggles you between Help and Non-Help modes.  If the 
  26.           window is showing you a help page, it will switch to 
  27.           the last Non-Help page that was displayed.  If not, the 
  28.           window switches to the last Help screen displayed for 
  29.           the current context. 
  30.  
  31.           (HELP key on Wang, F11 key on TI-PC, CTRL-PF5 key on 
  32.           Sanyo)
  33.            
  34. F10       In non-help mode, toggles you between the available 
  35.           non-help windows: the sign-on/second disassembly 
  36.           window, the status window, the memory display window, 
  37.           and, if you have a floating-point chip, the floating-
  38.           point display window. 
  39.  
  40.           In help mode, toggles you between the help windows 
  41.           available in the current context.
  42.  
  43. Ctrl-I    Takes you from any other window directly to the 
  44. or TAB    sign-on/second disassembly window.  This window 
  45.           contains the D86 sign-on message until the first time 
  46.           that the Instruction Pointer leaves the first 
  47.           disassembly page.  From that point on, the sign-on 
  48.           message is no longer available, and you get a second 
  49.           disassembly page instead. 
  50.  
  51. Ctrl-S    Takes you from any other window directly to the 
  52.           debugger status window.
  53.  
  54. Ctrl-F    Takes you from any other window directly to the 
  55.           floating-point display window, if your machine has a 
  56.           floating-point chip in operation.  If not, this key is 
  57.           ignored.
  58.                                                              4-2
  59.  
  60. Ctrl-N    If you have a memory display window in sight, this key 
  61.           advances to the Next window-full of memory.
  62.  
  63.           If you do not have a memory display window, but do have 
  64.           at least one memory line specification, this key takes 
  65.           you from any other window to the memory display window, 
  66.           continuing from the end of the last line-display.
  67.  
  68.           If you have no memory line specifications set up, this 
  69.           key is ignored.
  70.  
  71. Ctrl-P    If you have a memory display window in sight, this key 
  72.           retreats the pointer to memory displayed, by the amount 
  73.           displayed in the window.  If all the memory formats 
  74.           specified generate a fixed-size display (such as the 
  75.           B,W,T formats), then this will effect a "Previous page" 
  76.           function.  If there are formats producing a variable-
  77.           size display (such as the N,D,C,S,L formats), then the
  78.           retreat will be a probably imperfect approximation to 
  79.           an appropriate "Previous page" amount.
  80.  
  81.           If you do not have a memory display window, this key 
  82.           will go to one, just like the Ctrl-N key.
  83.  
  84. Ctrl-Q    If you are not displaying a help window, this key takes
  85.           you to the last help window that was displayed for the 
  86.           current context.  If you are already displaying a help 
  87.           window, this key toggles through all the help windows 
  88.           available for this context.
  89.  
  90.  
  91. Instruction Pointer Positioning Control Keys
  92.  
  93. All the remaining keys in this chapter can be invoked any time 
  94. the debugger is in its main command mode, awaiting the first key 
  95. of a debugger-command or immediate-assembly line.  They change 
  96. the value of the Instruction Pointer (IP register), and thus they 
  97. change the disassembly display. 
  98.  
  99. None of the control keys in this section cause any program code 
  100. to be executed, other than the equivalent of a JMP instruction,
  101. to the place that the disassembly cursor winds up. 
  102.  
  103. WARNING: On some debuggers, you can change the location of what 
  104. is being disassembled without changing the IP register value.  
  105. I've decided on a "what you see is what you get" philosophy, 
  106. since you may well be moving the IP cursor to effect a jump in 
  107. the program (for example, you might use the Down-Arrow key to 
  108. experimentally skip over the execution of one or more 
  109. instructions in the program).  If your intention was just to look 
  110. around the program before continuing execution at the place you 
  111. left off, you may use the HOME key to return to the place where 
  112. execution last halted. 
  113.                                                              4-3
  114.  
  115. Down-Arrow   Jump to the instruction following the current one. 
  116.              Visually, the disassembly cursor moves down by one
  117.              instruction line.
  118.  
  119. Up-Arrow     Jump to the instruction preceding the current one.
  120.              Visually, the disassembly cursor moves up by one 
  121.              instruction line.  NOTE that the implementation of 
  122.              this function is a little tricky, since it's 
  123.              impossible to reliably disassemble backwards.  What 
  124.              D86 does is retreat a fixed, fair-sized distance, 
  125.              disassemble forward until the current instruction is 
  126.              reached, and take the instruction disassembled just 
  127.              before the current one.  If there is non-instruction 
  128.              code in memory shortly before the current position, 
  129.              the synchronization may fail, and this instruction 
  130.              may put you in the middle of a previous instruction 
  131.              instead of the beginning.  If this happens, you may 
  132.              adjust by using the Ctrl-D or Ctrl-U keys.
  133.  
  134. Ctrl-D       This key is identical to the Down-Arrow key, except 
  135.              the jump forward is just one byte, instead of a full 
  136.              (usually multibyte) instruction.  (IP is 
  137.              incremented.)  You use this key when you think 
  138.              you've landed in the middle, rather than the start, 
  139.              of an instruction. 
  140.  
  141. Ctrl-U       This key decrements IP, moving the cursor "Up" by 
  142.              one byte's worth.  Like Ctrl-D, it is used to 
  143.              manually synchronize disassembly.
  144.  
  145. Pg Dn        Jump to the next disassembly page, at the memory 
  146.              location immediately following this page.  Repeated 
  147.              pressing of this key allows you to scan program code 
  148.              quickly.
  149.  
  150.              (Alt-Down-Arrow on the TI-PC)
  151.  
  152. Pg Up        Jump to the previous disassembly page, ending with 
  153.              the instruction just before the top instruction on 
  154.              the current page.  NOTE the warning given with the 
  155.              Up-Arrow description, about possible synchronization 
  156.              problems, applies here as well.
  157.  
  158.              (Alt-Up-Arrow on the TI-PC)
  159.                                                              4-4
  160.  
  161. Home         If you have moved the IP cursor since the last 
  162.              program instruction executed, then this key returns 
  163.              IP to that spot.  If you are already at that spot, 
  164.              this key returns you to the program's starting 
  165.              location.  For COM files, this is always location 
  166.              0100 in the original code segment.  For EXE files, 
  167.              this location was derived from the EXE header 
  168.              record.  Note that repeated pressing of HOME will 
  169.              cause IP to alternate between the two locations, so 
  170.              you can't mess yourself up by pressing the key one 
  171.              too many times-- just press it again. 
  172.  
  173. Ctrl-E       Jump to the End of the program, as determined when 
  174.              it was loaded, and possibly advanced if the program 
  175.              was patched from the end.
  176.  
  177.  
  178.  
  179. Program Execution Control Keys
  180.  
  181. F1           Single-step the current instruction.  If the 
  182.              instruction is a call, go into the procedure to 
  183.              single-step it.  If you want the entire procedure 
  184.              executed on a single keystroke, use the F2 key. 
  185.  
  186. F2           Procedure-step: start program, trapping at the 
  187.              instruction following the current one.  This is used 
  188.              for executing a procedure call all at once; for 
  189.              breaking out of a loop; and for executing a repeated 
  190.              string operation all at once. 
  191.  
  192. F4           Start the program, setting a trap at the destination 
  193.              of the conditional-jump instruction currently 
  194.              pointed to.  If we are not pointing to a conditional 
  195.              jump, then we single-step. 
  196.  
  197. F6           Start the program, setting a trap at the address on 
  198.              top of the stack (hopefully a procedure-return 
  199.              address). 
  200.  
  201.  
  202. Special Action Control Keys
  203.  
  204. F3           Repeat the last typed-in assembly language or 
  205.              debugger command 
  206.  
  207. F7           Enter the previously-described Patch Memory mode. 
  208.  
  209. Shift-F7     Mark the current CS:IP memory location, for use by
  210.              a following F debugger line command.  F can either 
  211.              return to this location, or find memory bytes that 
  212.              match the ones at this location.
  213.              
  214.              (Ctrl-7 on the Sanyo)
  215.                                                              4-5
  216.  
  217. Alt-F9       If you have a Color video board, your debugger 
  218.              display may become corrupted by the program's 
  219.              console output.  If it does, press Alt-F9 to 
  220.              eliminate the corruption.  This key exists only 
  221.              temporarily; on later versions of D86, the 
  222.              corruption will be corrected automatically. 
  223.  
  224.              (Ctrl-Shift-PF4 on the Sanyo)
  225.  
  226. Ctrl-T       Reset the debugger's internal Top-of-Stack pointer 
  227.              to the current SP value.  This will cause the 
  228.              current stack display to become empty, so that 
  229.              subsequently pushed values will appear by themselves 
  230.              on the stack display.
  231.  
  232.